package com.quanshu.shop.brocastreciver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.quanshu.shop.base.data.BroadcastReciverAction;
import com.quanshu.shop.pay.inf.PayResultIF;

/**
 * 作者  李哲
 * 创建时间 2018/8/6
 * 邮箱 lizhetongliao@163.com
 * 说明
 **/
public class PayBrocastReciver extends BroadcastReceiver {
    private PayResultIF payResultIF;

    public PayBrocastReciver setPayResultListener(PayResultIF payResultIF1) {
        payResultIF=payResultIF1;
        return this;
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        if (BroadcastReciverAction.PAY_RESULT_ACTION.equals(intent.getAction())) {
            //支付结果回调
            if (payResultIF != null) {
                payResultIF.payResult();
            }
        }
    }
}
